import service from '@/utils/request'

export const getParam = (id) => {
	return service.get('/api/sys/params?id=' + id)
}

export const saveParam = (dataForm) => {
	if (dataForm.id) {
		return service.put('/api/sys/params', dataForm)
	} else {
		return service.post('/api/sys/params', dataForm)
	}
}

export const deleteParam = (ids) => {
	return service.delete('/api/sys/params', {params: {id_arr: ids}})
}

export const getParamPage = (dataForm) => {
	return service.get('/api/sys/params_page', {params: dataForm})
}
